package com.ui.other;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.ddd.wandemo.R;

/**
 */
public class OtherFragment extends Fragment {

    private String text;
    public static OtherFragment newInstance(String text) {
        OtherFragment fragment = new OtherFragment();
        Bundle args = new Bundle();
        args.putString("index",text);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getArguments() != null) {
            text = getArguments().getString("index");
        }
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_other, container, false);
        TextView tvOther = view.findViewById(R.id.other);
        tvOther.setText(text);
        tvOther.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                
            }
        });
        return view;
    }

}
